<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Admin\Model;

/**
 * Description of ClassPayModel
 *
 * @author gc
 */
class ClassPayModel extends \Think\Model
{

    //一对多缴费
    public function toManyPay($sid, $grade_id, $fee, $pay_method)
    {
        $data = [
            'sid' => $sid,
            'fee' => $fee,
            'pay_method' => $pay_method,
            'pay_time' => time(),
            'grade_id' => $grade_id,
            'type' => 2, //一对多课程
            'admin_id' => UID,
            'status' => 1,
            'create_time' => time(),
            'update_time' => time()
        ];
        return M("Class_pay")->add($data);
    }

}
